package be.rivendale.renderer.mk2.window;

import be.rivendale.renderer.mk2.data.Segment;

import javax.swing.*;

public class Window extends JFrame {
    private Canvas canvas;

    public Window(int width, int height) {
        setTitle("Yellowstone Raytracer");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setResizable(false);

        canvas = new Canvas(width, height);
        setContentPane(canvas);
        pack();
    }

    public void blit(Segment segment) {
        canvas.blit(segment);
    }
}
